package com.huawei.java.main.classes;

public class Deploy {
    private final int deployServerId;
    private final Boolean deployA;

    public Deploy(int deployServerId, Boolean deployA) {
        this.deployServerId = deployServerId;
        this.deployA = deployA;
    }

    public int getDeployServerId() {
        return deployServerId;
    }

    public Boolean getDeployA() {
        return deployA;
    }

    @Override
    public String toString() {
        if (deployA != null) {
            return String.format("(%d, %s)",
                    this.deployServerId,
                    this.deployA ? "A" : "B");
        } else {
            return String.format("(%d)",
                    this.deployServerId);
        }
    }
}
